home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Ahoy 1987 July
/
Ahoy_Magazine_87-07_1987_Double_L_Side_A.d64
/
Electric Power1
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
429b
|
17 lines
0 rem << cd43-2 >>
1 rem ==================================
2 rem commodares problem #39-2 :
3 print"[147] [197]lectric [208]ower 1"
4 rem solution by
5 rem scott duncan
6 rem ==================================
10 r=2.79
20 for i=1 to 3:read u(i),r(i): next i
30 data 600, .0928, 90, .1052, 12, .1259
40 input "initial, final meter readings";u1,u2 : u=u2-u1
50 for i=1 to 3
60 j=u-u(i)
70 if j>0 then r=r+j*r(i) : u=u-j
80 next
90 print r "is due"